Memory
peek
peek(ADDR, [N])
Read n bytes, the starting address is addr.
A, B = peek(0, 2)
poke
poke(ADDR, VAL1, VAL2, ...)
Write byte data to address addr.
peek2
peek2(ADDR)
Read short data (2 bytes).
poke2
poke2(ADDR, VAL1, VAL2, ...)
Write short data (2 bytes).
peek4
peek4(ADDR)
Read integer data (4 bytes).
poke4
poke4(ADDR, VAL1, VAL2, ...)
Write integer data (4 bytes).
memcpy
memcpy(DEST_ADDR, SOURCE_ADDR, LEN)
Copy the data of length len from source_addr to dest_addr, the destination and the original area allow overlapping coverage.
reload
reload(DEST_ADDR, SOURCE_ADDR LEN, [FILENAME])
Reloads application data from within the application file.
If the filename is provided, the corresponding data in the file will be loaded, otherwise, the data of the current application will be loaded.
memset
memset(DEST_ADDR, VAL, LEN)
Fill the byte value val to the dest_addr address, and fill the length len.
Example:
memset(__vm_VRAM, 0x88, 0x1000)